Auto merge of #2282 - mcarton:clippy, r=alexcrichton
For information, here is the [log before and after](https://gist.github.com/mcarton/
684c030321c4c60d6bc9) with Clippy.
Remaining warnings from Clippy are mostly false positive or `str` to `string` conversion (too many of them for this PR).
```
warnings before:
cmp_owned : 2
cyclomatic_complexity : 1
deprecated : 11
explicit_iter_loop : 57
identity_op : 3
len_without_is_empty : 3
len_zero : 20
let_and_return : 3
map_clone : 14
needless_lifetimes : 4
needless_return : 24
ok_expect : 2
option_map_unwrap_or : 10
private_in_public : 28
redundant_closure : 2
should_implement_trait : 2
single_match : 3
str_to_string : 112
string_to_string : 12
type_complexity : 3
unnecessary_mut_passed : 2
unneeded_field_pattern : 3
unused_lifetimes : 1
unused_variables : 2
while_let_loop : 2
warnings after:
cmp_owned : 2
cyclomatic_complexity : 1
identity_op : 1
let_and_return : 3
map_clone : 1
needless_return : 3
ok_expect : 2
option_map_unwrap_or : 1
private_in_public : 28
should_implement_trait : 2
str_to_string : 80
type_complexity : 3
while_let_loop : 2
```